import Layout from '@/layout/index.vue'
import { markRaw } from 'vue'

export default [
  {
    path: '/account',
    component: markRaw(Layout),
    redirect: '/account',
    name: 'Account',
    meta: {
      root: 'system',
      title: '账户设置',
      authority: '管理-账户设置'
    },
    children: [
      {
        path: 'index',
        component: () => import('@/views/account/index.vue'),
        name: 'Adv',
        meta: {
          title: '腾讯广告',
          authority: '账户设置-腾讯广告'
        }
      },
      {
        path: 'callback',
        component: () => import('@/views/account/callback.vue'),
        name: 'AdvCallback',
        meta: {
          title: '授权状态',
          hidden: true,
          activeMenu: 'Adv'
        }
      }
    ]
  },
  {
    path: '/system',
    component: markRaw(Layout),
    redirect: '/system',
    name: 'System',
    meta: {
      root: 'system',
      title: '团队管理',
      authority: '管理-团队管理'
    },
    children: [
      {
        path: 'staff',
        component: () => import('@/views/system/staff.vue'),
        name: 'StaffList',
        meta: {
          title: '员工管理',
          authority: '团队管理-员工管理',
          keepAlive: true
        }
      },
      // {
      //   path: 'post',
      //   component: () => import('@/views/system/post.vue'),
      //   name: 'PostList',
      //   meta: {
      //     title: '岗位管理'
      //   }
      // },
      {
        path: 'edit-role',
        component: () => import('@/views/system/editRole.vue'),
        name: 'EditRole',
        meta: {
          title: '岗位管理',
          hidden: true,
          activeMenu: 'StaffList',
          authority: '团队管理-岗位管理'
        }
      }
    ]
  }
]
